//
//  UIButton+extension.swift
//  我的微博
//
//  Created by shmily on 15/8/2.
//  Copyright © 2015年 Stanford-IOS8-Swift-shmilyAshen. All rights reserved.
//

import UIKit

extension UIButton {
    
    convenience init(imageName:String,text:String,fontSize:CGFloat,color:UIColor)
    {
        self.init()
        
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setTitle(text, forState: UIControlState.Normal)
        setTitleColor(color, forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
    }
    
}
